Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send ddb region as awsCfg #5842

Merged
merged 3 commits into from
Mar 29, 2024
Merged

Conversation

danielblando
Copy link
Contributor

What this PR does:
Send DynamoDB region as awsConfig instead of session config

Which issue(s) this PR fixes:
Fixes #5840

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Signed-off-by: Daniel Deluiggi <ddeluigg@amazon.com>
Signed-off-by: Daniel Deluiggi <ddeluigg@amazon.com>
@danielblando danielblando marked this pull request as ready for review March 29, 2024 16:59
Signed-off-by: Daniel Deluiggi <ddeluigg@amazon.com>
@@ -57,13 +57,12 @@ func newDynamodbKV(cfg Config, logger log.Logger) (dynamodbKV, error) {
return dynamodbKV{}, err
}

awsCfg := aws.NewConfig()
if len(cfg.Region) > 0 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this check still necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Region here is optional in the config.
I would need to do a test to see what the client will do if we send an empty string. I am not sure if it will try to use the env var.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool just a nit

@yeya24 yeya24 merged commit 65d218b into cortexproject:master Mar 29, 2024
16 checks passed
alanprot pushed a commit to alanprot/cortex that referenced this pull request Apr 2, 2024
* Send ddb region as awsCfg

Signed-off-by: Daniel Deluiggi <ddeluigg@amazon.com>

* Add changelog

Signed-off-by: Daniel Deluiggi <ddeluigg@amazon.com>

* Fix lint

Signed-off-by: Daniel Deluiggi <ddeluigg@amazon.com>

---------

Signed-off-by: Daniel Deluiggi <ddeluigg@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants